# $Id: PKGBUILD 66227 2012-02-23 05:02:32Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=man-pages-ru
pkgver=0.98
pkgrel=6
pkgdesc="Russian Linux man pages"
arch=(any)
#url="http://alexm.here.ru/manpages-ru/"
url="http://www.linuxshare.ru/projects/trans/downloads.html"
depends=(man)
license=('FDL')
#source=(http://alexm.here.ru/manpages-ru/download/manpages-ru-$pkgver.tar.gz)
#source=(ftp://ftp.win.tue.nl/pub/linux-local/manpages/translations/man-pages-ru-$pkgver.tar.bz2)
source=(http://www.linuxshare.ru/projects/trans/manpages-ru-$pkgver.tar.bz2)
install=man-pages-ru.install
md5sums=('2d452b93a2731eac8bb1767f61ff7557')

build() {
  cd $srcdir/manpages-ru-$pkgver
  mkdir -p $pkgdir/usr/share/man/ru
  mv man* $pkgdir/usr/share/man/ru/
  cd $pkgdir/usr/share/man/ru
  # this is included in shadow
  rm -f man5/passwd.5*
  # convert to utf8
  find -type f | xargs -i123 -- sh -c "mv 123 123.old && iconv -f koi8-r -t utf8 123.old >123 && rm 123.old"
}
